#!/usr/bin/env python
# -*- coding: utf-8 -*-

def f():
    while True:
        print("begin...")
        yield "yield"
        print("after...")

g = f()
print(next(g))
print('-'*100)
print(next(g))
print('-'*100)
print(next(g))